package com.jd.sunny.java.collection;

import java.util.Comparator;

/**
 * @Description: implements Comparator<Item> to compare
 * @author:sunlin
 * @since:2012-12-05 19:11
 * @version:1.0.0
 */
public class ItemComparator implements Comparator<Item>{

    /**
     * second method to compare
     * @param o1
     * @param o2
     * @return
     */
    public int compare(Item o1, Item o2) {
       return o1.getName().compareTo(o2.getName());
    }

}
